package com.packet.service.impl;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class TeacherBelong extends Teacher {

    TeacherBelong(Integer id,String name){
        super(id,name);
    }


    private List<Teacher> children = new ArrayList<>();


    public void remove(Teacher resource) {
        children.remove(resource);
    }

    public void add(Teacher resource) {
        this.children.add(resource);
    }

    public List<Teacher> getChildren() {
        return this.children;
    }
}
